package com.orientechnologies.lucene.test;

import com.orientechnologies.orient.core.metadata.schema.OClass;
import com.orientechnologies.orient.core.metadata.schema.OSchema;
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.impl.ODocument;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

/** Created by frank on 13/12/2016. */
public class LuceneSortTest extends BaseLuceneTest {

  private static String DESCRIPTION =
      "verylong verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong  verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylongverylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong  verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylongverylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong  verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylongverylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong  verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylongverylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong  verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylongverylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong  verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylongverylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong  verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylongverylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong  verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylongverylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong  verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylongverylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong  verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylongverylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong  verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylongverylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong  verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong verylong"
          + " verylong verylong verylong verylong verylong verylong verylong verylong";

  @Before
  public void setUp() throws Exception {
    OSchema schema = db.getMetadata().getSchema();

    OClass cls = schema.createClass("Person");
    cls.createProperty("name", OType.STRING);
    cls.createProperty("surname", OType.STRING);
    cls.createProperty("description", OType.STRING);
  }

  @Test
  public void shouldIndexVeryLongDescriptionWithWildCardConfig() throws Exception {

    db.save(new ODocument("Person").field("description", DESCRIPTION));

    db.command(
            "create index Person.description on Person(description) FULLTEXT ENGINE LUCENE METADATA"
                + " { \"*_index_sorted\" : false }")
        .close();

    long count =
        db.query("SELECT FROM Person WHERE SEARCH_CLASS(\"verylong\")  = true").stream().count();

    Assert.assertEquals(1, count);
  }

  @Test
  public void shouldIndexVeryLongDescriptionWithSingleField() throws Exception {

    db.save(new ODocument("Person").field("description", DESCRIPTION));

    db.command(
            "create index Person.description on Person(description) FULLTEXT ENGINE LUCENE METADATA"
                + " { \"description_index_sorted\" : false }")
        .close();

    long count =
        db.query("SELECT FROM Person WHERE SEARCH_CLASS(\"verylong\") = true ").stream().count();

    Assert.assertEquals(1, count);
  }
}
